
exports.__esModule = true;
exports.default = void 0;

const _utils = require('../utils');

const _relation = require('../mixins/relation');

const _createNamespace = (0, _utils.createNamespace)('row');
const createComponent = _createNamespace[0];
const bem = _createNamespace[1];

const _default = createComponent({
  mixins: [(0, _relation.ParentMixin)('vanRow')],
  props: {
    type: String,
    align: String,
    justify: String,
    tag: {
      type: String,
      default: 'div',
    },
    gutter: {
      type: [Number, String],
      default: 0,
    },
  },
  methods: {
    onClick: function onClick(event) {
      this.$emit('click', event);
    },
  },
  render: function render() {
    let _bem;

    const h = arguments[0];
    const { align } = this;
    const { justify } = this;
    const flex = this.type === 'flex';
    return h(this.tag, {
      class: bem((_bem = {
        flex,
      }, _bem[`align-${align}`] = flex && align, _bem[`justify-${justify}`] = flex && justify, _bem)),
      on: {
        click: this.onClick,
      },
    }, [this.slots()]);
  },
});

exports.default = _default;
